package day10.homework;

import java.util.Scanner;

public class Test {
		static Scanner sca = new Scanner(System.in);	
		public void register(){
			System.out.println("请输入要注册学生的学号，姓名，年龄");			
			String message = sca.next();
			String[] message1= new String[300];
			message1=message.split(",");
			int  id = Integer.parseInt(message1[0]);
			int age=Integer.parseInt(message1[2]);
			Student s=new Student(id, message1[1], age);
			System.out.println(s.toString());
			System.out.println("请输入你要确认的学生ID号");
			}		
		
		public void serch(){
			
		}
		
		public void login(){
			
		}
		
		public void quit(){
			
		}
		public static void main(String[] args) {			
				Test t=new Test();
				System.out.println("请输入你要执行的命令：");
				String command=sca.next();
				while(true){
				if(command.equals("register")){
						t.register();
						break;
				}else if(command.equals("search")){
						t.serch();
						break;
				}else if(command.equals("login")){
						t.login();
						break;
				}else if(command.equals("quit")){
						t.quit();
						break;
				}else{
					System.out.println("你输入的命令不正确，请重新输入：");	
					//continue;
				}	continue;
				}
		}
}